package com.cy6;

import java.util.PriorityQueue;

/**
 * @author CY
 * @date 2022/10/19 15:11
 **/
class Student{
    private int age;

    public Student(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                '}';
    }
}
public class HeapTest {
    public static void main(String[] args) {
        PriorityQueue<Student> pq=new PriorityQueue<>();
        pq.offer(new Student(25));
        pq.offer(new Student(89));
        System.out.println(pq.poll());



    }
}
